<?php

global $babAddonPhpPath;

include_once $babAddonPhpPath.'../UNSDepartement/defines.php';

include_once $babAddonPhpPath.'../UNSDepartement/functions/department.php';
include_once $babAddonPhpPath.'../UNSDepartement/functions/formation.php';
include_once $babAddonPhpPath.'../UNSDepartement/functions/level.php';
include_once $babAddonPhpPath.'../UNSDepartement/functions/material.php';
include_once $babAddonPhpPath.'../UNSDepartement/functions/semester.php';
include_once $babAddonPhpPath.'../UNSDepartement/functions/staff.php';
include_once $babAddonPhpPath.'../UNSDepartement/functions/teachingUnit.php';
include_once $babAddonPhpPath.'../UNSDepartement/functions/tutorialGroup.php';
include_once $babAddonPhpPath.'../UNSDepartement/functions/workPraticeGroup.php';



/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

//TODO A MODIFIER

function unsDepartement_getGroupIDByName($name) {


    global $babDB;

    $res = $babDB->db_query("select * from " . BAB_GROUPS_TBL . " where name = '$name'");
    $count = $babDB->db_num_rows($res);

    if ($count == 1) {
        $arr = $babDB->db_fetch_array($res);
        return $arr['id'];
    }
    return false;
}

?>
